package com.plian.system.wrapper.fr.internalauditmanagement;

import com.plian.system.dto.fr.internalauditmanagement.IamRectifyIssureListDTO;
import com.plian.system.entity.fr.internalauditmanagement.IamRectifyIssureList;
import com.plian.system.mybatis.support.BaseWrapper;
import com.plian.system.vo.fr.internalauditmanagement.IamRectifyIssureListVO;
import com.plian.system.wrapper.util.CacheWrapperUtil;
import com.plian.system.wrapper.util.WrapperUtil;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import static com.plian.system.wrapper.util.WrapperConstant.DICT_CODE_TO_NAME;
import static com.plian.system.wrapper.util.WrapperConstant.SPRING;

/**
 * 审计整改-问题清单(IamRectifyIssureList)表数据库访问层
 *
 * @author jiatp
 * @since 2023-03-02 14:10:14
 */
@Mapper(componentModel = SPRING, uses = {CacheWrapperUtil.class, WrapperUtil.class})
public interface IamRectifyIssureListWrapper extends BaseWrapper<IamRectifyIssureList, IamRectifyIssureListDTO, IamRectifyIssureListVO> {


    @Override
    @Mappings(value = {
            @Mapping(source = "issureNature", target = "issureNatureName", qualifiedByName = DICT_CODE_TO_NAME),
            @Mapping(source = "rectifyType", target = "rectifyTypeName", qualifiedByName = DICT_CODE_TO_NAME)
    })
    IamRectifyIssureListDTO entityToDto(IamRectifyIssureList entity);

}

